//
//  ChatViewController.m
//  xmppones
//
//  Created by 李立达 on 2017/3/1.
//  Copyright © 2017年 李立达. All rights reserved.
//

#import "ChatViewController.h"

@interface ChatViewController ()<UITableViewDelegate,UITableViewDataSource>

@property(nonatomic,strong)UITableView *tableView;
@property (nonatomic,strong)UIView *bottomeBar;
@property (nonatomic,strong)UITextField *inputField;
@property (nonatomic,strong)UIButton *sendButton;
@end

@implementation ChatViewController

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    self.tabBarController.tabBar.hidden = YES;
    
}

- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    self.tabBarController.tabBar.hidden = NO;
}


- (void)viewDidLoad {
    [super viewDidLoad];
    [self creatview];
}

-(void)creatview
{
    self.tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, NavgionbarHeight, KDeviceWith, KDeviceHeight-NavgionbarHeight-49) style:UITableViewStylePlain];
    self.tableView.delegate= self;
    self.tableView.dataSource = self;
    self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    [self.tableView registerClass:[UITableView class] forCellReuseIdentifier:@"IMMessagecell"];
    [self.view addSubview:self.tableView];
    
}

-(UIButton *)returnLeftButton
{
    UIImage *image = [UIImage imageNamed:@"nav_back"];
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    [button setImage:image forState:UIControlStateNormal];
    [button addTarget:self action:@selector(backButtonAction:) forControlEvents:UIControlEventTouchUpInside];
    button.bounds = CGRectMake(0, 0, image.size.width, image.size.height);
    return button;
}

-(void)backButtonAction:(UIButton *)sender
{
    [super backButtonAction:sender];
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 1;
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"IMMessagecell"];
    return cell;
}

@end
